I'm running Limesurvey 3.15 and would like to set up a token based survey including open registration.
When participants register they type in their name + emai laddress and then get redirected to a page where their name + email address is displayed + a short message that they will receive an email soon with the link to the survey.
I already found out how to change that short message. However, what I would like to add is the link to the survey which is sent out via email such that participants can click on the link to directly answer the survey.
In Limesurvey 2.7 I think that was possible using the placeholder {SURVEURYL}. In LS 3.15 with TWIG files, I think that using that term is not possible anymore. What I could already include was the name of the survey or the name of the admin of the survey. Yet, I did not find a possibility yet to include the token based link.
I am not sure, but because of the logic I don't think it was ever possible. Because {surveyurl} does not contain the token, as far as I know. But if it is a token based survey, you need the token to be able to enter the survey.
I might be mistaken though.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
In any way, if someone can participate without receiving the email, what is the point of the registration? You could just type any email and still would be able to participate. If that is what you want, you could just include 3 questions at the beginning of the survey that ask for name, lastname and email, couldn't you?
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Thank you. I included that code, however, nothing is shown on the registration page. I also cleared the asset cache, but still no luck.
Anyways, I found the answer based on this post here:
www.limesurvey.org/es/comunidad/foros/in...ions-from-2-x-to-3-x
The code is: {{ processString('{SURVEYURL}') }}
Just a quick extension: With {{SURVEYURL}} no self-generated links with the "<a>" tag of HTML can be generated. That is why @@SURVEYURL@@ exists which only creates the link but without the "<a>" tag. However, @@SURVEYURL@@ does not work with TWIG files.
Therefore, I've created a workaround. The result looks like this:
<a href="https://URL-OF-YOUR-DOMAIN/index.php/{{ processString(aSurveyInfo.sid) }}/lang/LANGUAGE-OF-YOUR-STUDY-SUCH-AS-DE OR EN/token/{{ processString('{TOKEN}') }}">Please click here to be redirected to the survey
With {{ processString(aSurveyInfo.sid) }} the SID of the survey is processed and with {{ processString('{TOKEN}') }} the token of the participant is processed. When clicking on the link he/she will be immediately redirected to the survey.
Besides that workaround: Is there any equivalent of SURVEYURL in TWIG? Again, I was not able to process the dump-command. This did not give me any results - neither did it give me any error.